

App.set('index_tg', [{
	li_style: 'background:url(img/images/lanrenzhijia_bg1.jpg);display:block',
	h2: '互联网+  O2O实战',
	p: '基于互联网的品牌行销策略的策划与执行。<br />辅助企业实现品牌战略目标的互联网解决方案。',
	href: '#',
	img_url: 'img/images/20120905092323647.png',
}, {
	li_style: 'background:url(img/images/lanrenzhijia_bg2.jpg);',
	h2: 'Web应用(B/S)定制开发',
	p: '自主研发、完善的开发框架。<br />详细的需求调研及解决方案。<br />实施项目经验丰富的项目团队。',
	href: '#',
	img_url: 'img/images/20120830015430148.png',
}, {
	li_style: 'background:url(img/images/lanrenzhijia_bg3.jpg);',
	h2: '互联网时代的整合营销',
	p: '基于互联网的品牌营销策略的定制与执行。<br />品牌形象挖掘、梳理、包装、表现与传播。<br />坐拥着最为丰富的行业经验与优势资源。',
	href: '#',
	img_url: 'img/images/20120830015446637.png',
},{
	li_style: 'background:url(img/images/lanrenzhijia_bg5.jpg);',
	h2: '不可忽略的移动终端',
	p: 'IOS系统、Android系统应用开发。<br />App Store、Google Play 发布。<br />APP推广服务。',
	href: '#',
	img_url: 'img/images/20120830015631560.png',
}, ])

var curIndex = 0;
var time = 800;
var slideTime = 5000;
var adTxt = $("#lanrenzhijia_img>li>div>.ad_txt");
var adImg = $("#lanrenzhijia_img>li>div>.ad_img");
var int = setInterval("autoSlide()", slideTime);
$("#lanrenzhijia_ctr>ul>li[class!='first-item'][class!='last-item']").click(function () {
    show($(this).index("#lanrenzhijia_ctr>ul>li[class!='first-item'][class!='last-item']"));
    window.clearInterval(int);
    int = setInterval("autoSlide()", slideTime);
});
function autoSlide() {
    curIndex + 1 >= $("#lanrenzhijia_img>li").size() ? curIndex = -1 : false;
    show(curIndex + 1);
}
function show(index) {
    $.easing.def = "easeOutQuad";
    $("#drag_ctr,#drag_arrow").stop(false, true).animate({ left: index * 115 + 20 }, 300);
    $("#lanrenzhijia_img>li").eq(curIndex).stop(false, true).fadeOut(time);
    adTxt.eq(curIndex).stop(false, true).animate({ top: "340px" }, time);
    adImg.eq(curIndex).stop(false, true).animate({ right: "120px" }, time);
    setTimeout(function () {
        $("#lanrenzhijia_img>li").eq(index).stop(false, true).fadeIn(time);
        adTxt.eq(index).children("p").css({ paddingTop: "50px", paddingBottom: "50px" }).stop(false, true).animate({ paddingTop: "0", paddingBottom: "0" }, time);
        adTxt.eq(index).css({ top: "0", opacity: "0" }).stop(false, true).animate({ top: "170px", opacity: "1" }, time);
        adImg.eq(index).css({ right: "-50px", opacity: "0" }).stop(false, true).animate({ right: "10px", opacity: "1" }, time);
    }, 200)
    curIndex = index;
}


